package cn.sciento.farm.devicemanager.api.jsonrpc;

import cn.sciento.farm.devicemanager.api.jsonrpc.dto.BatchCreateDeviceDTO;
import cn.sciento.farm.devicemanager.dao.entity.DevDevice;
import cn.sciento.farm.devicemanager.dao.model.ResponseMessage;
import com.googlecode.jsonrpc4j.JsonRpcMethod;
import com.googlecode.jsonrpc4j.JsonRpcService;

/**
 * 设备
 */
@JsonRpcService("rpc/hardware.device")
public interface DeviceJsonApi {

    ResponseMessage create(DevDevice device);

    @JsonRpcMethod(value = "batch_create")
    ResponseMessage batchCreate(BatchCreateDeviceDTO deviceDTO);

    ResponseMessage update(DevDevice device);

    ResponseMessage get(String id);

    ResponseMessage list(Integer landId, Integer areaId);

    ResponseMessage delete(String id);

    ResponseMessage config(DevDevice devDevice);


    ResponseMessage statistics(Integer areaId);


    @JsonRpcMethod(value = "read_params")
    ResponseMessage readParams(String id);
}
